FROM debian:buster

RUN apt update -y && apt install -y \
  make \
  clang \
  mingw-w64 \
  gcc-aarch64-linux-gnu \
  gcc-arm-linux-gnueabihf \
  gcc-powerpc64le-linux-gnu \
  gcc-riscv64-linux-gnu

RUN dpkg --add-architecture arm64 \
  && dpkg --add-architecture armhf \
  && dpkg --add-architecture ppc64el

RUN apt update -y && apt install -y \
  libssl-dev libssl-dev:arm64 libssl-dev:armhf libssl-dev:ppc64el \
  uuid-dev uuid-dev:arm64 uuid-dev:armhf uuid-dev:ppc64el

COPY ./build-agents.sh /bin/
RUN chmod +x /bin/build-agents.sh

WORKDIR /src
CMD ["/bin/build-agents.sh"]
